package com.vaannila.action;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LinkAction extends ActionSupport {

	private static final long serialVersionUID = -2613425890762568273L;	
	private Map session;
	private String scritpMenu;
	
	public Map getSession() {
		return session;
	}

	public void setSession(Map session) {
		this.session = session;
	}

	public String getScritpMenu() {
		return scritpMenu;
	}

	public void setScritpMenu(String scritpMenu) {
		this.scritpMenu = scritpMenu;
	}

	public void cargaMenu(){
		Map session = ActionContext.getContext().getSession();
		setSession(session);
		
		if(session.get("menu")!=null){
			setScritpMenu(session.get("menu").toString());
		}
	}
	
	public String welcome()
	{
		cargaMenu();
		return "welcome";		
	}
	
	public String friends()
	{
		cargaMenu();
		return "friends";		
	}
	
	public String office()
	{
		cargaMenu();
		return "office";		
	}
}
